// 用户相关接口
import request from '@/utils/request'
import {loginForm, tokenData, userData,} from "@/api/user/type";
import {ResponseData} from "@/api/type";

// 统一管理接口
enum API {
    LOGIN_URL = '/user/login',
    USERINFO_URL = '/user/info',
}

//暴露请求方法
export const reqLogin = (data: loginForm) => request.post<string, ResponseData<tokenData>>(API.LOGIN_URL, data)
export const reqUserInfo = () => request.get<string, ResponseData<userData>>(API.USERINFO_URL)